package com.silverbox.waimai.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.silverbox.waimai.entity.WaimaiItemDetail;

public interface WaimaiItemDetailMapper {
	int deleteByPrimaryKey(Integer id);

	int insert(WaimaiItemDetail record);

	int insertSelective(WaimaiItemDetail record);

	WaimaiItemDetail selectByPrimaryKey(Integer id);

	int updateByPrimaryKeySelective(WaimaiItemDetail record);

	int updateByPrimaryKey(WaimaiItemDetail record);

	/**
	 * 根据itemId查询订单项明细
	 * 
	 * @param itemId
	 * @return
	 */
	List<WaimaiItemDetail> getWaimaiDetailItemByItemId(Integer itemId);

	/**
	 * 批量插入订单项明细
	 * 
	 * @param details
	 */
	void insertByBatch(@Param("details") List<WaimaiItemDetail> details);
}